package cn.wolfcode.crm.query;

import lombok.Getter;
import lombok.Setter;
import org.apache.shiro.util.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Setter@Getter
public class EmployeeQueryObject extends QueryObject {
    //排序条件
    private String sort;//哪个列
    private String order;//什么顺序

    //高级查询
    private String keyword;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date beginDate;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endDate;
    private Long deptId;

    public String getKeyword(){
        return StringUtils.hasLength(keyword)?keyword:null;
    }
}
